
struct hash_entry {
	char * key;
	void * value;
	struct hash_entry * next;
};

typedef struct hash_entry * hash_entry;

struct hash_table {
	hash_entry * table;
	int size;
	int multiplier;
	int count;
};
typedef struct hash_table * hash_table;

typedef unsigned int hash_int;

hash_int hash(hash_table t, char * key);
hash_table new_hash_table(int size, int multiplier);

hash_entry hash_use(hash_table t, char * key, int create, void * value);

void * hash_get(hash_table t, char * key);
void hash_set(hash_table t, char * key, void * value);

int hash_count(hash_table t);
char ** hash_keys(hash_table t);
void ** hash_values(hash_table t);

